$OpenBSD: shmpatch-sched_c,v 1.1 2003/11/22 00:56:58 espie Exp $
--- sched.c.orig	2003-09-08 16:26:36.000000000 +0200
+++ sched.c	2003-11-17 23:37:54.000000000 +0100
@@ -110,6 +110,10 @@ calctimo()
   return min;
 }
 
+#ifdef IPC_EXPORT_IMAGE
+ extern struct window *windows;
+#endif
+
 void
 sched()
 {
@@ -121,6 +125,11 @@ sched()
 
   for (;;)
     {
+#ifdef IPC_EXPORT_IMAGE
+      /* export image from last used window which is on top of the list */
+      CopyWinImage( windows, shm );
+#endif
+
       if (calctimeout)
 	timeoutev = calctimo();
       if (timeoutev)
